package com.sparrow.manage.common.tree;

import java.util.ArrayList;
import java.util.List;

public class TreeTable<E> {

    private int code;

    private String msg;

    private List<TreeTableElement<E>> data = new ArrayList<TreeTableElement<E>>();

    public List<TreeTableElement<E>> getData() {
        return data;
    }

    public void setData(List<TreeTableElement<E>> data) {
        if(data != null){
            this.data = data;
        }
    }

    public void addData(TreeTableElement<E> element){
        data.add(element);
    }

    public int getCount(){
        return data.size();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
